<?php
$moduleName = Zend_Controller_Front::getInstance()->getRequest()->getModuleName();
$controllerName = Zend_Controller_Front::getInstance()->getRequest()->getControllerName();
?>
<div class="innNav">    
    <ul>
        <?php if ($this->userDetail->role == 'superadmin' || $this->userDetail->role == 'admin') {
            ?>
            <?php if ($moduleName == 'home') {
                ?>
                <li><a class="<?= ($controllerName == 'dashboard') ? 'innNavSelected' : ''; ?>" href="/home/dashboard"><span>Dashboard</span></a></li>
                <li><a class="<?= ($controllerName == 'tidsplan') ? 'innNavSelected' : ''; ?>" href="/home/tidsplan"><span>Tidsplann</span></a></li>
            <?php } else if ($moduleName == 'planning') {
                ?>
                <li><a class="<?= ($controllerName == 'cabinet') ? 'innNavSelected' : ''; ?>" href="/planning/cabinet"><span>Nod</span></a></li>
                <li><a class="<?= ($controllerName == 'switch') ? 'innNavSelected' : ''; ?>" href="/planning/switch"><span>Skåp</span></a></li>
                <li><a class="<?= ($controllerName == 'house') ? 'innNavSelected' : ''; ?>" href="/planning/house"><span>Fastighet</span></a></li>
                <li><a class="<?= ($controllerName == 'document') ? 'innNavSelected' : ''; ?>" href="/planning/document"><span>Files</span></a></li>
            <?php } else if ($moduleName == 'marketing') {
                ?>
                <li><a class="<?= ($controllerName == 'notification') ? 'innNavSelected' : ''; ?>" href="/marketing/notification"><span>Notification</span></a></li>
                <li><a class="<?= ($controllerName == 'team' || $controllerName == 'target') ? 'innNavSelected' : ''; ?>" href="/marketing/team"><span>Team</span></a></li>
                <li><a class="<?= ($controllerName == 'tidsplan') ? 'innNavSelected' : ''; ?>" href="/marketing/tidsplan"><span>Tidsplan</span></a></li>
            <?php } else if ($moduleName == 'street') {
                ?>
                <li><a class="<?= ($controllerName == 'notification') ? 'innNavSelected' : ''; ?>" href="/street/notification"><span>Notifications</span></a></li>
                <li><a class="<?= ($controllerName == 'house') ? 'innNavSelected' : ''; ?>" href="/street/house"><span>Fastighet</span></a></li>
            <?php } else if ($moduleName == 'house') {
                ?>
                <li><a class="<?= ($controllerName == 'notification') ? 'innNavSelected' : ''; ?>" href="/house/notification"><span>Notifications</span></a></li>
                <li><a class="<?= ($controllerName == 'house') ? 'innNavSelected' : ''; ?>" href="/house/house"><span>Fastighet</span></a></li>
            <?php } else if ($moduleName == 'installation') {
                ?>
                <li><a class="<?= ($controllerName == 'notification') ? 'innNavSelected' : ''; ?>" href="/installation/notification"><span>Notifications</span></a></li>
                <li><a class="<?= ($controllerName == 'house') ? 'innNavSelected' : ''; ?>" href="/installation/house"><span>Fastighet</span></a></li>
            <?php } else if ($moduleName == 'economy') {
                ?>
                <li><a class="innNavSelected" href="/economy"><span>DashBoard</span></a></li>
                <?php
            }
        } else {
            switch ($this->userDetail->department) {
                case 'planning': {
                        break;
                    }
                case 'marketing': {
                        ?>
                        <li><a class="<?= ($controllerName == 'mynotification') ? 'innNavSelected' : ''; ?>" href="/marketing/mynotification"><span>Notifications</span></a></li>
                        <li><a class="<?= ($controllerName == 'myhouses' ) ? 'innNavSelected' : ''; ?>" href="/marketing/myhouses"><span>Fastighet</span></a></li>
                        <?php
                        break;
                    }
                case 'streetDigging': {
                        ?>
                        <li><a class="<?= ($controllerName == 'mynotification') ? 'innNavSelected' : ''; ?>" href="/street/mynotification"><span>Notifications</span></a></li>
                        <li><a class="<?= ($controllerName == 'myhouses') ? 'innNavSelected' : ''; ?>" href="/street/myhouses"><span>Fastighet</span></a></li>
                        <?php
                        break;
                    }
                case 'houseDigging': {
                        ?>
                        <li><a class="<?= ($controllerName == 'mynotification') ? 'innNavSelected' : ''; ?>" href="/house/mynotification"><span>Notifications</span></a></li>
                        <li><a class="<?= ($controllerName == 'myhouses') ? 'innNavSelected' : ''; ?>" href="/house/myhouses"><span>Fastighet</span></a></li>
                        <?php
                        break;
                    }
                case 'installation': {
                        ?>
                        <li><a class="<?= ($controllerName == 'mynotification') ? 'innNavSelected' : ''; ?>" href="/installation/mynotification"><span>Notifications</span></a></li>
                        <li><a class="<?= ($controllerName == 'myhouses') ? 'innNavSelected' : ''; ?>" href="/installation/myhouses"><span>Fastighet</span></a></li>
                        <?php
                        break;
                    }
                case 'economy': {
                        ?>
                        <li><a class="innNavSelected" href="/economy"><span>DashBoard</span></a></li>
                        <?php
                        break;
                    }
            }
        }
        ?>
    </ul>
</div>
<div class="clr"></div>